package com.eastfair.venueservice.service;

import com.eastfair.venueservice.dto.ExhibitionSettlementDTO;
import com.eastfair.venueservice.dto.ServiceOrderDTO;
import com.eastfair.venueservice.entity.ServiceOrder;
import com.eastfair.venueservice.vo.ExhibitionSettlementVO;
import com.eastfair.venueservice.vo.ServiceOrderVO;

import java.util.List;

/**
 * 场馆报修订单 service.
 *
 * @author dqq
 * @date 2023 /4/26
 */
public interface VenueRepairServiceOrderService {

    /**
     * 展会ID查询需结算的场馆报修订单
     *
     * 主场保证金订单取消之后不统计到结算单中
     *
     * @param query the query
     * @return the list
     */
    List<ServiceOrderVO> listForVenueRepairOrderSettlement(ServiceOrderDTO query);

    /**
     * 展会ID获取报修结算单
     * <p>
     * 不需要
     * 未提交的订单
     * 已取消的订单
     *
     * @param query the query
     * @return the repair settlement by exhibition id
     */
    ExhibitionSettlementVO getVenueRepairSettlement(ExhibitionSettlementDTO query);

    /**
     * 订单编号获取服务订单VO.
     *
     * @param orderNumber the order number
     * @return the vo by order number
     */
    ServiceOrderVO getVOByOrderNumber(String orderNumber);

    /**
     * 保存服务订单.
     *
     * @param serviceOrderDTO the service order dto
     * @return the boolean
     */
    ServiceOrder saveServiceOrderForVenue(ServiceOrderDTO serviceOrderDTO);

    /**
     * 更新订单.
     *
     * @param serviceOrderDTO the service order dto
     * @return the boolean
     */
    ServiceOrder updateServiceOrder(ServiceOrderDTO serviceOrderDTO);

    /**
     * 提交订单.
     *
     * @param orderNumber order number
     * @return the boolean
     */
    boolean submitServiceOrder(String orderNumber);

    /**
     * 取消订单.
     *
     * @param orderNumber the order number
     * @return the boolean
     */
    boolean cancelServiceOrder(String orderNumber);

    /**
     * 超时未支付取消订单.
     *
     * @param orderNumber the order number
     * @return the boolean
     */
    boolean cancelTimeoutNotPayServiceOrder(String orderNumber);

    /**
     * 更新报修单是否预定服务.
     *
     * @param orderNumber   the order number
     * @param isBookService the is book service
     * @return the boolean
     */
    boolean updateRepairReportIsBookService(String orderNumber, Integer isBookService);

    /**
     * 更新搭建商报修申请的需赔付场馆金额为场馆为主场下的报修订单金额.
     *
     * @param orderNumber the repair report number
     * @return the boolean
     */
    boolean updateBuilderRepairReportCompensateVenueAmount(String orderNumber);

    /**
     * 取消场馆为主场下的订单，搭建商报修申请需赔付场馆金额清0.
     *
     * @param orderNumber the order number
     * @return the boolean
     */
    boolean cancelBuilderRepairReportCompensateVenueAmount(String orderNumber);

    /**
     * 支付订单.
     *
     * @param serviceOrderDTO the service order dto
     * @return the boolean
     */
    boolean payServiceOrder(ServiceOrderDTO serviceOrderDTO);

}